package com.mhtube.mappers;

import com.mhtube.entity.po.User;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface UserMapper {
    int insertUser(@Param("user") User user);
    User selectByUserId(@Param("userId") String userId);
    List<User> selectAllByUsername(@Param("username") String username);
    List<User> selectAllByEmail(@Param("email") String email);
    List<User> selectAllByNikeName(@Param("nikeName") String nikeName);
    List<User> selectUserByUsernameAndPassword(@Param("username") String username, @Param("password") String password);
    User selectByUserIdWithVideoList(@Param("userId") String userId);
    int updateLastLoginDateById(@Param("userId") String userId, @Param("date") Date date);
    int updateDescriptionByUserId(@Param("userId") String userId, @Param("description") String description);
    int updateNikeNameByUserId(@Param("userId") String userId, @Param("nikeName") String nikeName);
}
